package com.largeOrange.ajaxclass;

import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
import java.io.PrintWriter;

/**
 * @author 大橙子
 * @version 1.0
 * @since 1.0
 */
@WebServlet("/request03")
public class AjaxServlet003 extends HttpServlet {
    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String username = request.getParameter("username");
        PrintWriter writer = response.getWriter();
        writer.print(username);
        System.out.println(username);
    }
}
